		function GetRequest() {   
			   var url = location.search; //获取url中"?"符后的字串   
			   var theRequest = new Object();   
			   if (url.indexOf("?") != -1) {   
			      var str = url.substr(1);   
			      strs = str.split("&");   
			      for(var i = 0; i < strs.length; i ++) {   
			         theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);   
			      }   
  			 }   
   			return theRequest;   
		} 
	
	layui.use(['layer','form','element'],function(){
		
		 var layer = layui.layer;
		 var form = layui.form;
		 var $ = layui.$
		 var element = layui.element;
			
		//提交
		$("#submit").click(function(){
			 var oldPassword = 'hnzyydx'
			
			 var password = $("#password").val();
			 var data = {'studentNo':GetRequest().studentNo,'oldPassWord':'hnzyydx','newPassWord':password}
			 $.ajax({
			 		url:'http://localhost:8888/student/modify',
			 		data:data,
			 		type:'post',
			 		async: false,
			 		success:function(data){
			 			
			 			window.location.href = "index.html"
			 		},
			 		error:function(XMLHttpRequest){
			 			layer.msg("用户名或密码错误")
			 		}
			 	
			 })
		})
	})